package com.zsj.enums;

/**
 * @Description:
 * @Author:
 * @Date:
 */
public enum CarrierCodeEnum {

    CT("CT", "电信"),
    CU("CU", "联通"),
    CM("CM", "移动"),
    BN("BN", "⼴电"),
    ;

    private final String code;

    private final String msg;

    CarrierCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static CarrierCodeEnum findByCode(String code) {
        for (CarrierCodeEnum carrier : CarrierCodeEnum.values()) {
            if (carrier.getCode().equals(code)) {
                return carrier;
            }
        }
        return null;
    }
}
